package com.wander.patterns.act.chainOfResponsibility;

/**
 * @description:
 * @author: zhuyong
 * @create: 2019-09-07 16:48
 **/
public class Manager extends Leader{
    public Manager(String name) {
        super(name);
    }

    @Override
    void handlerRequest(LeaveRequest request) {
        if(request.getLeaveDays()>3 && request.getLeaveDays()<5){
            System.out.println("部门经理处理请求,同意与否?");
        }else{
            System.out.println("交由Boss审批");
            this.nextLeader.handlerRequest(request);
        }
    }
}
